/*
 *  Howl.h
 *  SoundController0002
 *
 *  Created by jiro on 11/06/17.
 *  Copyright 2011 jiro music. All rights reserved.
 *
 */

#pragma once

#include "../../sc/Common/Note.h"
#include "../../sc/NullableObject.h"
#include "HarmonicSound.h"
#include <string>

namespace sc
{
namespace hs
{

	class Howl : public NullableObject
	{
	private:

		HarmonicSound sounds[ 2 ];

	public:

		Howl();

		Howl( Sound::WaveType waveType1, Sound::WaveType waveType2,
			  ::sc::Note::MidiNumber midiNumber1, ::sc::Note::MidiNumber midiNumber2,
			  double nthHarmonics1, double nthHarmonics2 );

		Howl( Sound::WaveType waveType1, Sound::WaveType waveType2,
			  ::sc::Note::MidiNumber midiNumber1, ::sc::Note::MidiNumber midiNumber2,
			  double nthHarmonics1, double nthHarmonics2,
			  double dynamics1, double dynamics2 );

		Howl( double frequency1, double frequency2,
			  double dynamics1, double dynamics2 );

		const HarmonicSound& GetHarmonicSound( int index ) const;

		double GetFrequency() const;

		double GetDuration() const;
		
		double GetDynamics() const;

		Sound::WaveType GetWaveType( int index  ) const;

		::sc::Note::MidiNumber GetNoteMidiNumber( int index ) const;

		int GetNthHarmonics( int index ) const;

		double GetWeight() const;

		//	for std::set, sort by wieght desc
		bool operator < ( const Howl& howl ) const;

		bool operator == ( const Howl& howl ) const;

		bool operator != ( const Howl& howl ) const;

		std::string ToString( int tabCount = 0 ) const;

	};

}
}
